package com.neu.his.registlevel.serviceimpl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.neu.his.registlevel.entity.RegistLevel;
import com.neu.his.registlevel.mapper.RegistLevelMapper;
import com.neu.his.registlevel.service.RegistLevelService;
@Service
public class RegistLevelServiceImpl implements RegistLevelService{
	@Autowired
	private RegistLevelMapper registLevelMapper;

	@Override
	public boolean addRegistLevel(RegistLevel registLevel) {
		int save = registLevelMapper.addRegistLevel(registLevel);
		boolean flag = false;
		if(save>0) {
			flag = true;
		}
		return flag;
	}

	@Override
	public boolean delRegistLevel(int id) {
		int del = registLevelMapper.delRegistLevel(id);
		boolean flag = false;
		if(del>0) {
			flag = true;
		}
		return flag;
	}

	@Override
	public boolean updateRegistLevel(RegistLevel registLevel) {
		// TODO Auto-generated method stub
				int upd = registLevelMapper.updateRegistLevel(registLevel);
				boolean flag = false;
				if(upd>0) {
					flag = true;
				}
				return flag;
	}

	@Override
	public List<RegistLevel> pageRegistLevel(int page, int limit) {
		// TODO Auto-generated method stub
		return registLevelMapper.pageRegistLevel(page, limit);
	}

	@Override
	public int pageRegistLevelTotal() {
		// TODO Auto-generated method stub
		return registLevelMapper.pageRegistLevelTotal();
	}
	
}
